home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / ftplugin / mail.vim < prev    next >
Encoding:
Text File  |  2000-11-14  |  893 b   |  31 lines

  1. " Vim filetype plugin file
  2. " Language:    Mail
  3. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  4. " Last Change:    2000 Nov 13
  5.  
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8.   finish
  9. endif
  10. let b:did_ftplugin = 1
  11.  
  12. " Don't use modelines in e-mail messages, avoid trojan horses
  13. setlocal nomodeline
  14.  
  15. " many people recommend keeping e-mail messages 72 chars wide
  16. setlocal tw=72
  17.  
  18. " Set 'formatoptions' to break text lines and keep the comment leader ">".
  19. setlocal fo+=tcql
  20.  
  21. " Add mappings, unless the user didn't want this.
  22. if !exists("no_plugin_maps") && !exists("no_mail_maps")
  23.   " Quote text by inserting "> "
  24.   if !hasmapto('<Plug>MailQuote')
  25.     vmap <buffer> <LocalLeader>q <Plug>MailQuote
  26.     nmap <buffer> <LocalLeader>q <Plug>MailQuote
  27.   endif
  28.   vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>``
  29.   nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>``
  30. endif
  31.